package com.ysd.lis.controller.sta;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.sta.StaModelDto;
import com.ysd.lis.dto.sta.StaModelParam;
import com.ysd.lis.entity.sta.StaModelMenu;
import com.ysd.lis.service.sta.StaModelMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * cold_chain.sys_module 前端控制器
 * </p>
 *
 * @author prs
 * @since 2025-01-06
 */
@Api(tags = "标准模型模块")
@RestController
@RequestMapping("/lis/sta/staModelMenu")
public class StaModelMenuController extends BaseController {

    @Autowired
    StaModelMenuService staModelMenuService;

    @ApiOperation("获取菜单树")
    @GetMapping("/findModelMenuList")
    public Result findModelMenuList(StaModelParam sysMenu){
        return staModelMenuService.findModelMenuList(sysMenu);
    }

    @ApiOperation("新增")
    @PostMapping("/addModelMenu")
    public Result addModelMenu(@RequestBody StaModelMenu staModel){
        return  staModelMenuService.addModelMenu(staModel);
    }

    @ApiOperation("修改")
    @PostMapping("/editModelMenu")
    public Result editModelMenu(@RequestBody StaModelMenu supplier) {
        return staModelMenuService.editModelMenu(supplier);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteModelMenuList")
    public Result batchDeleteModelMenuList(@RequestBody StaModelDto dto){
        return  staModelMenuService.batchDeleteModelMenuList(dto);
    }

    @ApiOperation("批量新增")
    @PostMapping("/batchAddModelMenuList")
    public Result batchAddModelMenuList(@RequestBody StaModelDto dto){
        return  staModelMenuService.batchAddModelMenuList(dto);
    }
}
